import os
from pathlib import Path
# root = Path(r'F:\GongJiang\Bioweaver\Bioweaver_Data\Managed')
# root = Path(r'F:\GongJiang\Bioweaver\BepInEx\core')

roots=[Path(r'D:\Quasimorph\Quasimorph_Data\Managed'),Path(r'D:\Quasimorph\BepInEx\core')]
out_file = Path('./temp.txt')

with out_file.open('w', encoding='utf-8') as f:
    for root in roots:
        for dll_path in root.rglob('*.dll'):
                name = dll_path.stem
                f.write(f'  <Reference Include="{name}">\n')
                f.write(f'    <HintPath>{dll_path}</HintPath>\n')
                f.write('    <Private>False</Private>\n')
                f.write('  </Reference>\n')
print(f'已写入 {out_file.resolve()}')